home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gfr100.zip / GFR.DOC < prev    next >
Text File  |  1992-02-26  |  6KB  |  140 lines

  1. GFR :: GMUtant Find and Replace                              version 1.00
  2.  
  3. Description: GFR is a simple utility designed for one purpose...to save
  4. typing during coding of source for pascal, c, clipper, dbase or any other
  5. language that uses ASCII files as source code.  With GFR, you can use short
  6. names for variables during the coding process.  When you're done,
  7. use GFR to expand terms into more meaningful variable names.  The result
  8. is somewhat better self-documentation for your code and some time
  9. saved during coding.
  10.  
  11. You can also standardize your case using GFR. For example, if in some
  12. parts of your code you use a variable named Filename and in another
  13. part you use your real preference, FileName, you can run GFR in automatic
  14. mode and ask to ignore case, replacing all filename with FileName...this
  15. will catch Filename, FILENAME or even FiLeNaMe.
  16.  
  17.  
  18. Registration? None required. If you use GFR send a post card, letter or
  19. call our BBS, letting us know you're using the program--given the intricate
  20. web of BBS's around the world, it's always interesting to see where one's
  21. efforts end up.
  22.  
  23. Author: Clyde W. Grotophorst, Systems Office, Fenwick Library
  24.         George Mason University, 4400 University Dr., Fairfax, VA 22030
  25.         GMUtant OnLine BBS: (703) 993-2219       Compuserve: 70404,3376
  26.  
  27. =========================================================================
  28.  
  29.   Input: Any ASCII file(s). Input files must be in the
  30.          current directory. This restriction was done to
  31.          minimize the chance of accidentally running
  32.          GFR on files you didn't really intend to process.
  33.          You may call GFR from any directory as long as the
  34.          GFR.EXE file is in a subdirectory on your Path.
  35.  
  36.  Output: If a change is made, your original file is saved with
  37.          a GFR extension. The new file (with changes made)
  38.          carries the original file name.
  39.  
  40. Process: GFR will make global changes to text strings in the file as
  41.          you direct.
  42.  
  43. Options: ignore case, automatic processing.
  44.  
  45. Use GFR with caution. It is a powerful utility and we've tried to make it
  46. safe but you never want to use global find & replace commands without
  47. a bit of thought.
  48.  
  49.                                A Usage Example
  50.  
  51. For example, suppose you're coding a multi-file pascal program. If you
  52. follow a naming convention for each unit (e.g., MYPROG.PAS which uses
  53. MYSCR.PAS and MYFILES.PAS and MYUTILS.PAS for units).  Then when you're
  54. coding the application you can use short variable names during the
  55. coding process.  To illustrate, suppose you constantly have this
  56. sequence of code in your program.
  57.  
  58. Assign(InputFile,InputFileName);
  59. {$I-}
  60. Reset(InputFile);
  61. {$I+}
  62.  
  63. It will be faster to code it originally as:
  64.  
  65. Assign(inf,infn);
  66. {$I-}
  67. Reset(inf);
  68. {$I+}
  69.  
  70. Then when you're finished, use GFR to expand the 'inf' and 'infn' to
  71. InputFile and InputFileName...
  72.  
  73. C:\TP>GFR MY*.PAS [return]
  74.  
  75.   GFR 1.0 (c) 1992, GMUtant Software         Global Find/Replace Utility
  76.   Processing [MY*.PAS]
  77.  
  78.   Enter original string -> inf
  79.   Enter replacement string -> InputFile
  80.   Ignore case (y/n)? Y
  81.   Automatic Processing (y/n)? Y
  82.  
  83. Ignore case means if the characters in your original string match the
  84. input file, a change will be made regardless of the case of the
  85. original.
  86.  
  87. Automatic processing means GFR will make the changes without pausing
  88. for your approval.
  89.  
  90. If a change is made, the original file will have a GFR extension. During
  91. development we originally had GFR give the new file a GFR extension and
  92. saved the original file with it's original name. After using the
  93. program for a while, we realized that it worked better the other
  94. way around--since you can do interative runs of the program to
  95. make a multitude of changes...renaming the GFR extensions back to the
  96. original file extension.
  97.  
  98.                         Note on case sensitivity
  99.  
  100. If you turn off case sensitivity, it is possible that the report on
  101. matches/changes will not match your perception of what should be
  102. happening.  Specifically, if you replace original text with the
  103. same new text (changing only the capitalization), then each match
  104. (regardless of case) will be counted...sometimes the text in your
  105. old and new string will be identical but GFR will still count it as
  106. a 'match.'  Also realize that if you turn off automatic processing
  107. while case sensitivity is off, you will only be shown lines that are
  108. actually different once 'changed.'  This can cause a situation where
  109. you ask to review all changes, GFR shows you nothing, and yet finishes
  110. by reporting that 100 changes were made.  In this instance, you can
  111. ignore the change report--GFR has made changes that replaced existing
  112. text with identical new text...
  113.  
  114.  
  115. During operation, GFR creates temp files for each file being processed.
  116. The temp files are given a ~G~ extension.  When GFR first cranks up,
  117. it seeks out and deletes any ~G~ files that may exist.  Then as it is
  118. processing, the new file is written to a temp file with the same name
  119. as the original but a ~G~ extension. When all matching files have
  120. been processed, the ~G~ extension files are given the original's
  121. extension and the original file is renamed with a GFR extension.
  122.  
  123.             GFR is one of several GMUtant Utility programs
  124.  
  125.   GFD - delete files across all logical drives for a specified filespec
  126.   GFF - find files across all logical drives
  127.   GTU - 20+ utilities in one (sort, case conversion, word count, etc.)
  128.  
  129.                     Other GMUtant Software Products:
  130.  
  131.   BIBL    - Personal Library/Bibliography Management System. [SHAREWARE]
  132.             This is our 'flagship' product. It's available on our BBS
  133.             or from CompuServe's IBM Apps forum (General appications).
  134.   CD2BIBL - Convert CD-ROM downloads for use with BIBL
  135.   ZKWIK   - KWIC/KWOC indexing package
  136.  
  137.  
  138. Revision history:  1.00 February 26, 1992. initial release.
  139.  
  140.